#  This file is part of -_-.
#
#    -_- is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    -_- is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with -_-.  If not, see <http://www.gnu.org/licenses/>.
#
#    Copyright 2012 Oliver Katz

include ../config.mk

DIRECTFB_OBJ=backend_directfb.o
OPENGL_OBJ=backend_opengl.o

build : $(DIRECTFB_OBJ) $(OPENGL_OBJ)
	$(MK) $(MKFLAGS) -C layout_engine build
	$(MK) $(MKFLAGS) -C display_engine build

test : test_xmouse.o test_opengl_x11.o
	$(CC) $(CFLAGS) test_xmouse.o -o test_xmouse $(LDFLAGS)
	$(CC) $(CFLAGS) test_opengl_x11.o -o test_opengl_x11 $(LDFLAGS)
	$(MK) $(MKFLAGS) -C layout_engine test
	$(MK) $(MKFLAGS) -C display_engine test

clean :
	$(MK) $(MKFLAGS) -C layout_engine clean
	$(MK) $(MKFLAGS) -C display_engine clean
	$(RM) $(RMFLAGS) $(shell echo *.o) test_opengl_x11 test_xmouse
